package homework;

class SalesEmployee extends Employee {
    private double monthlySales;
    private double commissionRate;

    public SalesEmployee(String name, int birthdayMonth, double monthlySales, double commissionRate) {
        super(name, birthdayMonth);
        this.monthlySales = monthlySales;
        this.commissionRate = commissionRate;
    }

    public double getMonthlySales() {
        return monthlySales;
    }

    public double getCommissionRate() {
        return commissionRate;
    }

    public double getSalary(int month) {
        return monthlySales * commissionRate + super.getSalary(month);
    }
}